<p id="notice"><%= notice %></p>

<h1>Wallet</h1>

<table>
  <tr>
    <td>id</td>
    <td><%= @wallet.id %></td>
  </tr>
  <tr>
    <td>name</td>
    <td><%= @wallet.name %></td>
  </tr>

  <tr>
    <td>amounts</td>
    <td>

      <% if @wallet.amounts && !@wallet.amounts.empty?%>
          <table>
            <% @wallet.amounts.each do |amount| %>
                <tr style="padding-left:30px;">
                  <td><%= amount.value %></td>
                  <td><%= amount.currency.code %></td>
                </tr>
            <% end %>
          </table>
      <% else %>
          <p>Has not defined yet.</p>
      <% end %>
    </td>
  </tr>
</table>

<%= link_to 'Edit', edit_wallet_path(@wallet) %> |
<%= link_to 'Back', wallets_path %>
